let app = getApp();
Page({
  data: {
    goodList: [],
    shopping:[],
    stateList:[]
  },
  onLoad(options) {
    wx.showLoading();
    let that = this;
    this.setData({
      id:options.id
    });
    this.getLiuCheng();
    wx.getStorage({
      key: 'openid',
      success(res) {
        app.get('DingDanDiZhi', {
          action: 'getDingDanById',
          id: options.id
        }).then((res) => {
          wx.hideLoading(); 
          that.setData({
            goodList: res.listmingxi,
            shopping:res
          });
        })
      },
    })
  },
  getLiuCheng(){
    let that = this;
    app.get('DingDanDiZhi',{
      action:'getdingdanliuheng',
      id: this.data.id
    }).then((res)=>{
      that.setData({
        stateList:res.data
      })
    })
  }
})